+((w) => {
    w.utils.imgLazyLoad = (imgArray) => {
        const callback = (entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    let image = entry.target;
                    let dataSrc = image.getAttribute("data-src");
                    image.setAttribute("src", dataSrc);
                }
            });
        }
        const observer = new IntersectionObserver(callback);
        imgArray.forEach(element => {
            observer.observe(element);
        });
    }
})(window);
